<!DOCTYPE html>
<html onclick="javascirpt:alert('html');">
<head>
	<title>事件流</title>
	<meta charset="utf-8">
</head>
<body onclick="javascirpt:alert('body');">
	<div style="width:200px;height: 200px;background: red;"></div>
	<script type="text/javascript">
		document.getElementsByTagName("div")[0].onclick = function(e){
			alert("div");
			var oEv = e || event;
			// 阻止冒泡的兼容性处理
			if(oEv.stopPropagation()){
				oEv.stopPropagation();//非IE下
			}else{
				oEv.cancelBubble = true;//IE8以上支持
			}
			
		}
	</script>

</body>
</html>